import dayjs from "dayjs";



export default function useTime() {
    
    const format = (datestr:string,pattern:string="YYYY-MM-DD HH:mm")=>{
        return dayjs(datestr).format(pattern);
    }

    return {format}

}